package socketmina.client;

import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.core.session.IoSession;

/**
 * @ClassName TcpClientHandler
 * @Description TODO
 * @Author yuanweimin
 * @Date 2018/8/23 20:03
 * @Version 1.0
 **/
public class TcpClientHandler extends IoHandlerAdapter {

    private String values;

    public TcpClientHandler(String values) {
        this.values = values;
    }

    @Override
    public void sessionOpened(IoSession session) throws Exception {
        session.write(values);
    }
}
